package com.ubing.boot.notesforjava.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.rmi.runtime.Log;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName : GlobalExceptionController
 * @Description : GlobalExceptionController
 * @Author : Xxxxx
 * @Date: 2023-02-17 14:04
 */
@RestController
public class GlobalExceptionController {
    @RequestMapping("/error/exception")
    public void error(HttpServletRequest request) throws Exception {
        throw ((Exception) request.getAttribute("filter.error"));
    }
}
